<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Object</title>
    <!--引入Vue-->
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
<div class="root">
    <h1>欢迎来到{{name}}峡谷</h1><br>
    <label>
        <input type="text" placeholder="按下回车提示输入" @keyup.enter="showInfo"/>
        <input type="text" placeholder="按下CapsLock提示输入" @keyup.caps-lock="showInfo"/>
    </label>
</div>
</body>

<script type="text/javascript">
    const vm = new Vue({
        el:'.root',
        data:{
            name:'召唤师'
        },
        methods:{
            showInfo(e){
                console.log(e.target.value)
            },
        }
    })
</script>
</html>
